{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "7b39f2db-f3b1-4d39-acc4-024cc9d84a9a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "jingai\n",
      "Namespace(batch_size=4, checkpoint_step=1, context_path='resnet18', crop_height=720, crop_width=960, csv='jingai.txt', cuda='0', data='/path/4/CamVid', dataset='CamVid', epoch_start_i=0, learning_rate=0.025, loss='dice', num_classes=3, num_epochs=1000, num_workers=1, optimizer='sgd', pretrained_model_path=None, save_model_path='/project/train/models', test_label_path='/home/data/1433/*.jpg', train_label_path='/home/data/1430/*.jpg', use_gpu=True, validation_step=1)\n",
      "train /home/data/1430/*.jpgimglen:48\n",
      "test /home/data/1433/*.jpgimglen:50\n",
      "epoch 0, lr 0.025000\n",
      "loss for train : 2.701219\n",
      "start val!\n",
      "precision per pixel for test: 0.008\n",
      "mIoU for validation: 0.000\n",
      "epoch 1, lr 0.024977\n",
      "loss for train : 2.639959\n",
      "start val!\n",
      "precision per pixel for test: 0.065\n",
      "mIoU for validation: 0.029\n",
      "epoch 2, lr 0.024955\n",
      "loss for train : 2.583799\n",
      "start val!\n",
      "precision per pixel for test: 0.127\n",
      "mIoU for validation: 0.060\n",
      "epoch 3, lr 0.024932\n",
      "^C\n",
      "Traceback (most recent call last):\n",
      "  File \"train.py\", line 276, in <module>\n",
      "    main(params_luotu)\n",
      "  File \"train.py\", line 217, in main\n",
      "    train(args, model, optimizer, dataloader_train, dataloader_val)\n",
      "  File \"train.py\", line 96, in train\n",
      "    writer.add_scalar('loss_step', loss, step)\n",
      "  File \"/usr/local/lib/python3.7/dist-packages/tensorboardX/writer.py\", line 457, in add_scalar\n",
      "    scalar(tag, scalar_value, display_name, summary_description), global_step, walltime)\n",
      "  File \"/usr/local/lib/python3.7/dist-packages/tensorboardX/summary.py\", line 151, in scalar\n",
      "    scalar = make_np(scalar)\n",
      "  File \"/usr/local/lib/python3.7/dist-packages/tensorboardX/x2num.py\", line 28, in make_np\n",
      "    return check_nan(prepare_pytorch(x))\n",
      "  File \"/usr/local/lib/python3.7/dist-packages/tensorboardX/x2num.py\", line 43, in prepare_pytorch\n",
      "    x = x.cpu().numpy()\n",
      "KeyboardInterrupt\n"
     ]
    }
   ],
   "source": [
    "!python train.py jingai"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0b92fd2d-8cc1-4dce-a152-eb551c9c2cf4",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
